import { type PropType, type ExtractPropTypes } from 'vue';

export interface IStatusLabelOption {
  label: string;
  value: string | number;
  color?: 'primary' | 'danger' | 'warning' | 'success' | 'info' | (string & {});
}

export const statusLabelProps = Object.assign({}, {
  mode: {
    type: String as PropType<'label' | 'tag'>,
    default: 'label',
  },
  value: {
    type: [String, Number] as PropType<string | number>,
    default: '',
  },
  options: {
    type: Object as PropType<IStatusLabelOption[]>,
    default: () => ({}),
  },
  dot: Boolean,
} as const);

export type StatusLabelProps = ExtractPropTypes<typeof statusLabelProps>;
